package com.cqie.mapper;

import com.cqie.dto.entrepot.AddEntrepotWarehouseInfoDto;
import com.cqie.entity.EntrepotWarehouseInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 不吃海鲜
 * @since 2024-12-05
 */
public interface EntrepotWarehouseInfoMapper extends BaseMapper<EntrepotWarehouseInfo> {

    /**
     * 根据仓库名字和编号查询仓库信息
     *
     * @param addEntrepotWarehouseInfoDto
     * @return
     */
    EntrepotWarehouseInfo getWarehouseInfoByNameOrCode(AddEntrepotWarehouseInfoDto addEntrepotWarehouseInfoDto);

    /**
     * 删除仓库信息
     *
     * @param warehouseId
     * @return
     */
    Boolean delWarehouseInfo(Integer warehouseId);

    /**
     * 计算仓库数量
     *
     * @return
     */
    Long getWarehouseInfoCount();

    /**
     * 根据仓库id查询仓库信息
     *
     * @param warehouseId
     * @return
     */
    EntrepotWarehouseInfo getEntrepotWarehouseInfo(@Param("warehouseId") Integer warehouseId);

}
